home *** CD-ROM | disk | FTP | other *** search
- Path: news.ov.com!news
- From: glenn@ov.com (Fletcher.Glenn@ov.com)
- Newsgroups: comp.lang.c
- Subject: Re: *Pointer to Functions(); /* HELP */
- Date: 25 Jan 1996 19:35:41 GMT
- Organization: OpenVision
- Message-ID: <4e8m2d$c4q@spanky.pls.ov.com>
- References: <4dvrq8$c2c@news.unicomp.net>
- Reply-To: glenn@ov.com
- NNTP-Posting-Host: foghorn.pls.ov.com
-
- In article c2c@news.unicomp.net, jgore@conline.com (Jerry_Gore) writes:
- >How do I pass a pointer to a funtion?
- >The following is found in a program:
- >
- > #define WORD unsigned int
- > void InstallTimer0(WORD period,void far (*func)(void));
- >
- >My function is thus:
- >
- > void far animate(void) /* I added 'far' for no good reason. */
- > { /* It uses that name in InstallTimer0. */
- > /* do what ever */
- > return;
- > }
- >
- >How do I send InstallTimer0 the pointer to my function animate ???
- >I tried:
- >
- > InstallTimer0(120 , (*animate)());
- >
- >But of course, this does not work and neither did anything else!
- >What do I do ???
- >
-
-
- Have you tried?:
-
- InstallTimer0(120, animate);
-
- Fletcher.Glenn@ov.com
-
-
-